<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="icon" th:href="@{/favicon.ico}" type="image/x-icon"/>
    <style>
        .t table {
            width:100%;
            margin:15px 0;
            border:0;
        }
        .t th {
            background-color:#00BFFF;
            color:#FFFFFF
        }
        .t,.t th,.t td {
            font-size:0.95em;
            text-align:center;
            padding:4px;
            border-collapse:collapse;
        }
        .t th,.t td {
            border: 1px solid #6ddafe;
            border-width:1px 0 1px 0
        }
        .t tr {
            border: 1px solid #6ddafe;
        }
        .t tr:nth-child(odd){
            background-color:#aae9fe;
        }
        .t tr:nth-child(even){
            background-color:#fdfdfd;
        }
    </style>
</head>
<body>

<h2 style="text-align: center">学生列表</h2><br>
<div class="table-responsive">
    <table style="height: 400px;width: 1000px;border: 1px solid black;margin: 0 auto" class="t">
        <thead>
        <tr>
            <th>id</th>
            <th>name</th>
            <th>sex</th>
            <th>grade</th>
            <th>major</th>
            <th>cname</th>
            <th style="color: red;text-decoration: none">操作</th>
        </tr>
        </thead>
        <tbody>
        <tr th:each="cr:${clist}">
            <td th:text="${cr.id}"></td>
            <td th:text="${cr.name}"></td>
            <td th:text="${cr.sex}"></td>
            <td th:text="${cr.grade}"></td>
            <td th:text="${cr.major}"></td>
            <td th:text="${cr.cname}"></td>
            <td>
                <a th:href="@{'/stu/slist/'+${cr.id}}" style="text-decoration: none">详细信息</a>
            </td>
        </tr>
        </tbody>
    </table>
</div>

</body>
</html>